How to Replace All Occurrences of a String in JavaScript